<?php
/**
 * 
 */
class JobType extends AppModel {
	var $name = 'JobType';
	var $displayField = 'name';
  
	var $validate = array(
      
		'name' => array(
        'notempty' => array(
          'rule' => array('notempty'),
          //'message' => 'Your custom message here',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
        'maxlength' => array(
          'rule' => array('maxlength', 40),
          'message' => 'Maximum length of this field is 40.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
        'isUnique' => array(
            'rule' => 'isUnique',        
            'message' => 'This value has already been taken. Select a unique value.'
        )
		),
	);
	//The Associations below have been created with all possible keys, those that are not needed can be removed

	var $hasMany = array(
		'JobVersion' => array(
        'className' => 'JobVersion',
        'foreignKey' => 'job_type_id',
        'dependent' => false,
        'conditions' => '',
        'fields' => '',
        'order' => '',
        'limit' => '',
        'offset' => '',
        'exclusive' => '',
        'finderQuery' => '',
        'counterQuery' => ''
		)
	);

}
